package com.yueshop.order.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yueshop.common.mq.SeckillOrderTo;
import com.yueshop.common.utils.PageUtils;
import com.yueshop.order.entity.OrderEntity;
import com.yueshop.order.vo.*;

import java.util.Map;
import java.util.concurrent.ExecutionException;

/**
 * 订单
 *
 * @author cr
 * @email cr@gmail.com
 * @date 2021-04-09 14:44:56
 */
public interface OrderService extends IService<OrderEntity> {

    PageUtils queryPage(Map<String, Object> params);

    OrderConfirmVo orderConfirm() throws ExecutionException, InterruptedException;

    OrderSubmitResponseVo submitOrder(OrderSubmitVo orderSubmitVo);

    OrderEntity getOrderByOrderSn(String orderSn);

    void closeOrder(OrderEntity orderEntity);

    PayVo payOrder(String orderSn);

    PageUtils queryPageWhithItem(Map<String, Object> params);

    String handlePayResult(PayAsyncVo payAsyncVo);

    void saveSeckillOrder(SeckillOrderTo seckillOrderTo);
}

